Skip to content

ci: pull CPU-only torch wheels on GPU-less runners#385

Merged
bruAristimunha merged 1 commit into
developfrom
ci/cpu-torch-wheels
Jun 19, 2026
Merged

ci: pull CPU-only torch wheels on GPU-less runners#385
bruAristimunha merged 1 commit into
developfrom
ci/cpu-torch-wheels

Conversation

@bruAristimunha

Copy link
Copy Markdown
Collaborator

What

Set UV_TORCH_BACKEND: cpu on the uv pip install steps in tests.yml and doc.yaml so CI installs CPU-only torch.

Why

Both jobs install eegdash (braindecode[hub]torch) via uv on GPU-less ubuntu-latest runners with no backend pin. uv resolves the CUDA builds and pulls ~5 GB of nvidia CUDA/cuDNN libraries that never run, paid on every install and again on every uv cache upload/restore.

Test

Forcing the Linux platform uv resolves in CI:

# default (no flag)
torch==2.12.1
nvidia-cuda-cupti==13.0.85
nvidia-cuda-nvrtc==13.0.88
nvidia-cuda-runtime==13.0.96
nvidia-cudnn-cu13==9.20.0.48

# UV_TORCH_BACKEND=cpu
torch==2.12.1+cpu      # no nvidia-* packages

Notes

Scoped to CI, not pyproject.toml, so local and GPU installs are unaffected. UV_TORCH_BACKEND needs uv >= 0.6.0; setup-uv@v5 defaults to latest. YAML validated.

Ports facebookresearch/neuroai#163 to eegdash.

Set UV_TORCH_BACKEND=cpu on the uv install steps in tests.yml and doc.yaml.
GPU-less ubuntu-latest runners install torch (via braindecode) with uv and no
backend pin, so uv resolves the CUDA builds and pulls ~5 GB of unused nvidia
CUDA/cuDNN libraries that also bloat the uv cache. Scoped to CI, not pyproject,
so local and GPU installs are unaffected.
@github-actions

Copy link
Copy Markdown
Contributor

📚 Documentation Preview

📦 Download Documentation Artifact

Download the documentation-html artifact from the workflow run to view the docs locally.

💡 To enable live previews, add a SURGE_TOKEN secret to this repository. See surge.sh for setup instructions.

@bruAristimunha bruAristimunha merged commit b99036f into develop Jun 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant